import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import datasets
iris = datasets.load_iris()
df=pd.DataFrame(iris.data,
                columns=['花萼长度','花萼宽度','花瓣长度','花瓣宽度'])
print(df)
sns.set_style(style='darkgrid',rc={'font.sans-serif':'simhei'})
sns.set_palette('bright')
sns.pairplot(data=df)
plt.show()



import pandas as pd
from pyecharts import options as opts
from pyecharts .charts import Scatter
df = pd.read_excel('某店铺销售数据.xlsx')
scatter = Scatter(init_opts=opts.InitOpts(page_title='气泡图'))
scatter.add_xaxis(xaxis_data=df['商品价格（元）'])
scatter.add_yaxis(series_name=''
                  y_axis=df[['销售额（元）','利润率（%）']].values.tolist(),label_opts=opts.LabelOpts(is_show=False))
scatter.set_global_opts(
    title_opts=opts.TitleOpts(
        title='某店铺',
        pos_left='center'
    )
    xaxis_opts=opts.AxisOpts(name='商品价格（元）',name_location='center',name_gap=55),

)